package cn.iocoder.yudao.module.moa.dal.mysql.qjapplysub;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.moa.dal.dataobject.qjapplysub.QjApplySubDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.moa.controller.admin.qjapplysub.vo.*;

/**
 * MOA 请假关联 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface QjApplySubMapper extends BaseMapperX<QjApplySubDO> {

    default PageResult<QjApplySubDO> selectPage(QjApplySubPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<QjApplySubDO>()
                .eqIfPresent(QjApplySubDO::getQjdId, reqVO.getQjdId())
                .eqIfPresent(QjApplySubDO::getQjLx, reqVO.getQjLx())
                .betweenIfPresent(QjApplySubDO::getStartTime, reqVO.getStartTime())
                .betweenIfPresent(QjApplySubDO::getEndTime, reqVO.getEndTime())
                .betweenIfPresent(QjApplySubDO::getTotalTime, reqVO.getTotalTime())
                .betweenIfPresent(QjApplySubDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(QjApplySubDO::getId));
    }

}